|
| #define | MUTEX_DEBUG |
| |
| #define | SY_OSNAME "RedHat Linux" |
| |
| #define | syAssert(_stat_) assert(_stat_) |
| |
| #define | syGetTimeInSec() time(0) |
| |
| #define | sySleep(_secs_) sleep(_secs_) |
| |
| #define | syUSleep(_msecs_) usleep(_msecs_) |
| |
| #define | SYThread pthread_t |
| |
| #define | syIsValidThread(_taskId_) TRUE |
| |
| #define | syThreadGetCurrent pthread_self |
| |
| #define | syThreadDestroy(_taskId_) pthread_cancel(_taskId_); |
| |
| #define | SYMutex pthread_mutex_t |
| |
| #define | syMutexTake(_m) syMutexTakeDebug(_m, SY_LOG_FILE, SY_LOG_LINE) |
| |
| #define | SY_SEMAPHORE_AVAILABLE |
| |
| #define | SYSemaphore sem_t |
| |
| #define | sySemaphoreDelete(_s) sem_destroy(&_s) |
| |
| #define | sySemaphoreTake(_s) sem_wait(&_s) |
| |
| #define | sySemaphoreGive(_s) sem_post(&_s) |
| |
| #define | SY_LOCALHOSTIP4 /*{0, 0} */ {0x7f00 , 0x0001} |
| |
| #define | SY_LOCALHOSTIP6 {0, 0, 0, 0, 0, 0, 0, 1} /* {0, 0, 0, 0, 0, 0, 0, 0} */ |
| |
| #define | SY_LINKLOCALIP 0xfe80 |
| |
| #define | SY_ANYIP4 {0, 0} |
| |
| #define | SY_ANYIP6 {0, 0, 0, 0, 0, 0, 0, 0} |
| |
| #define | SY_ZEROIP {0, 0, 0, 0, 0, 0, 0, 0} |
| |
| #define | SY_ZEROIP4 0L |
| |
| #define | SY_INTERNALSOCKETPOOL |
| |
| #define | SYSocketHandle NQ_INT |
| |
| #define | SYSocketSet fd_set |
| |
| #define | syIsValidSocket(_sock) (_sock != ERROR) |
| |
| #define | syInvalidSocket() (ERROR) |
| |
| #define | syAddSocketToSet(_sock, _set) FD_SET((_sock), (_set)) |
| |
| #define | syIsSocketSet(_sock, _set) FD_ISSET((_sock), (_set)) |
| |
| #define | syClearSocketSet(_set) FD_ZERO((_set)) |
| |
| #define | syClearSocketFromSet(_sock, _set) FD_CLR((_sock), (_set)) |
| |
| #define | sySetDatagramSocketOptions(_sock) |
| |
| #define | sySetStreamSocketOptions(_sock) |
| |
| #define | syGetPid() getpid() |
| |
| #define | SYDirectory DIR* |
| |
| #define | syInvalidateDirectory(_pd) *(_pd) = NULL |
| |
| #define | syIsValidDirectory(_d) (_d != NULL) |
| |
| #define | SY_EXTENDFILENOTSUPPORTED |
| |
| #define | SY_PATHSEPARATOR '/' |
| |
| #define | SYFile int |
| |
| #define | syInvalidateFile(_f) *_f = ERROR |
| |
| #define | syIsValidFile(_file) (_file!=ERROR) |
| |
| #define | syInvalidFile() (ERROR) |
| |
| #define | SY_CP_FIRSTILLEGALCHAR {0xe5} |
| |
| #define | SY_CP_ANYILLEGALCHAR {0x7c, 0x5c} |
| |
| #define | syFlushFile(_file) ((fsync(_file)==OK)? NQ_SUCCESS:NQ_FAIL) |
| |
| #define | syGetSecurityDescriptor(_f, _i, _b) udGetSecurityDescriptor(_f, _i, _b) |
| |
| #define | sySetSecurityDescriptor(_f, _i, _b, _l) udSetSecurityDescriptor(_f, _i, _b, _l) |
| |
| #define | syPrintf printf |
| |
| #define | syFprintf fprintf |
| |
| #define | sySprintf sprintf |
| |
| #define | sySnprintf snprintf |
| |
| #define | syVsnprintf vsnprintf |
| |
| #define | sySscanf sscanf |
| |
| #define | syScanf scanf |
| |
| #define | syGetchar getchar |
| |
| #define | syFflush fflush |
| |
| #define | syUnlockFile(_file,_offsetHigh,_offsetLow,_lengthHigh,_lengthLow,_timeout) ((_file==ERROR)? NQ_FAIL:NQ_SUCCESS) |
| |
| #define | syLockFile(_file,_offsetHigh,_offsetLow,_lengthHigh,_lengthLow,_lockType,_oplockLevel) ((_file==ERROR)? NQ_FAIL:NQ_SUCCESS) |
| |
| #define | syGetHostName(_name, _nameLen) gethostname((_name), (_nameLen)) |
| |
| #define | SY_UNICODEFILESYSTEM |
| |
| #define | sySetRand() srand((unsigned int)time(0)) |
| |
| #define | syRand() rand() |
| |
|
| NQ_TIME | syGetTimeInMsec (void) |
| |
| NQ_TIME | syConvertTimeSpecToTimeInMsec (void *val) |
| |
| NQ_UINT32 | syConvertTimeInMsecToSec (NQ_TIME *timeMsec) |
| |
| NQ_INT | syGetTimeZone (void) |
| |
| void | syDecomposeTime (NQ_UINT32 time, SYTimeFragments *decomposed) |
| |
| NQ_UINT32 | syComposeTime (const SYTimeFragments *decomposed) |
| |
| NQ_BOOL | syGmtToString (NQ_BYTE *strTime, NQ_COUNT size, NQ_UINT32 t, const NQ_CHAR *fmt) |
| |
| void | syThreadStart (NQ_BOOL isRT, NQ_INT priorityLevel, SYThread *taskIdPtr, void(*startpoint)(void), NQ_BOOL background) |
| |
| void | syMutexCreate (SYMutex *_m) |
| |
| void | syMutexDelete (SYMutex *_m) |
| |
| void | syMutexTakeDebug (SYMutex *_m, const NQ_CHAR *text, const NQ_UINT line) |
| |
| void | syMutexGive (SYMutex *_m) |
| |
| NQ_STATUS | sySemaphoreCreate (SYSemaphore *semId, NQ_UINT count) |
| |
| void | sySemaphoreResetCounter (SYSemaphore *pSemID) |
| |
| NQ_INT | sySemaphoreTimedTake (SYSemaphore *sem, NQ_INT timeout) |
| |
| NQ_UINT32 | syGetIPv6ScopeId (const NQ_IPADDRESS6 ip) |
| |
| NQ_BOOL | syIsSocketAlive (SYSocketHandle sock) |
| |
| NQ_STATUS | syShutdownSocket (SYSocketHandle sock) |
| |
| NQ_STATUS | syCloseSocket (SYSocketHandle sock) |
| |
| NQ_STATUS | syListenSocket (SYSocketHandle sock, NQ_INT backlog) |
| |
| SYSocketHandle | syCreateSocket (NQ_BOOL stream, NQ_UINT family) |
| |
| NQ_STATUS | syBindSocket (SYSocketHandle sock, const NQ_IPADDRESS *ip, NQ_PORT port, NQ_BOOL reuseAddress) |
| |
| NQ_STATUS | syAllowBroadcastsSocket (SYSocketHandle sock) |
| |
| void | sySetClientSocketOptions (SYSocketHandle sock) |
| |
| void | syGetSocketPortAndIP (SYSocketHandle sock, NQ_IPADDRESS *ip, NQ_PORT *port) |
| |
| NQ_INT | sySendToSocket (SYSocketHandle sock, const NQ_BYTE *buf, NQ_COUNT len, const NQ_IPADDRESS *ip, NQ_PORT port) |
| |
| NQ_STATUS | syConnectSocket (SYSocketHandle sock, const NQ_IPADDRESS *ip, NQ_PORT port) |
| |
| NQ_INT | sySendSocket (SYSocketHandle sock, const NQ_BYTE *buf, NQ_COUNT len) |
| |
| NQ_STATUS | sySendSocketAsync (SYSocketHandle sock, const NQ_BYTE *buf, NQ_COUNT len, void(*releaseFunc)(const NQ_BYTE *)) |
| |
| NQ_INT | sySelectSocket (SYSocketSet *pset, NQ_UINT32 timeout) |
| |
| NQ_INT | syRecvFromSocket (SYSocketHandle sock, NQ_BYTE *buf, NQ_COUNT len, NQ_IPADDRESS *ip, NQ_PORT *port) |
| |
| NQ_INT | syRecvSocket (SYSocketHandle sock, NQ_BYTE *buf, NQ_COUNT len) |
| |
| NQ_INT | syRecvSocketWithTimeout (SYSocketHandle sock, NQ_BYTE *buf, unsigned int len, unsigned int secs) |
| |
| SYSocketHandle | syAcceptSocket (SYSocketHandle sock, NQ_IPADDRESS *ip, NQ_PORT *port) |
| |
| NQ_STATUS | sySendMulticast (SYSocketHandle socket, const NQ_BYTE *buffer, NQ_COUNT length, const NQ_IPADDRESS *ip, NQ_PORT port) |
| |
| void | sySubscribeToMulticast (SYSocketHandle socket, const NQ_IPADDRESS *ip) |
| |
| NQ_STATUS | syCreateDirectory (const NQ_WCHAR *name) |
| |
| NQ_STATUS | syDeleteDirectory (const NQ_WCHAR *name) |
| |
| SYDirectory | syOpenDirectory (const NQ_WCHAR *name) |
| |
| NQ_STATUS | syFirstDirectoryFile (const NQ_WCHAR *name, SYDirectory *pDir, const NQ_WCHAR **fileName) |
| |
| NQ_STATUS | syNextDirectoryFile (SYDirectory dir, const NQ_WCHAR **fileName) |
| |
| NQ_STATUS | syCloseDirectory (SYDirectory dir) |
| |
| SYFile | syCreateFile (const NQ_WCHAR *name, NQ_BOOL denyread, NQ_BOOL denyexecute, NQ_BOOL denywrite) |
| |
| NQ_STATUS | syDeleteFile (const NQ_WCHAR *name) |
| |
| NQ_STATUS | syRenameFile (const NQ_WCHAR *oldName, const NQ_WCHAR *newName) |
| |
| SYFile | syOpenFileForRead (const NQ_WCHAR *name, NQ_BOOL denyread, NQ_BOOL denyexecute, NQ_BOOL denywrite) |
| |
| SYFile | syOpenFileForWrite (const NQ_WCHAR *name, NQ_BOOL denyread, NQ_BOOL denyexecute, NQ_BOOL denywrite) |
| |
| SYFile | syOpenFileForReadWrite (const NQ_WCHAR *name, NQ_BOOL denyread, NQ_BOOL denyexecute, NQ_BOOL denywrite) |
| |
| NQ_STATUS | syTruncateFile (SYFile file, NQ_UINT32 offLow, NQ_UINT32 offHigh) |
| |
| NQ_INT | syReadFile (SYFile file, NQ_BYTE *buf, NQ_COUNT len) |
| |
| NQ_INT | syWriteFile (SYFile file, const NQ_BYTE *buf, NQ_COUNT len) |
| |
| NQ_STATUS | syCloseFile (SYFile fd) |
| |
| NQ_UINT32 | sySeekFileCurrent (SYFile file, NQ_INT32 off, NQ_INT32 offHigh) |
| |
| NQ_UINT32 | sySeekFileStart (SYFile file, NQ_UINT32 off, NQ_UINT32 offHigh) |
| |
| NQ_UINT32 | sySeekFileEnd (SYFile file, NQ_INT32 off, NQ_INT32 offHigh) |
| |
| NQ_STATUS | syGetFileInformation (SYFile file, const NQ_WCHAR *fileName, SYFileInformation *fileInfo) |
| |
| NQ_STATUS | syGetFileInformationByName (const NQ_WCHAR *fileName, SYFileInformation *fileInfo) |
| |
| NQ_STATUS | syGetFileSize (SYFile file, NQ_UINT64 *size) |
| |
| NQ_STATUS | sySetFileInformation (const NQ_WCHAR *fileName, SYFile handle, const SYFileInformation *fileInfo) |
| |
| NQ_STATUS | syGetVolumeInformation (const NQ_WCHAR *name, SYVolumeInformation *info) |
| |
| NQ_IPADDRESS4 | syGetHostByName (const char *name) |
| |
| void | syGetDnsParams (NQ_CHAR *domain, NQ_IPADDRESS *server) |
| |
| void | syGetMacAddress (NQ_IPADDRESS4 ip, NQ_BYTE *macBuffer) |
| |
| NQ_STATUS | syGetAdapter (NQ_INDEX adapterIdx, NQ_INDEX *osIndex, NQ_IPADDRESS4 *pIp, NQ_IPADDRESS6 *ip6, NQ_IPADDRESS4 *pSubnet, NQ_IPADDRESS4 *pBcast, NQ_WCHAR *pWins, NQ_WCHAR *pDns) |
| |
| NQ_STATUS | syDtStartPacket (SYSocketHandle sock) |
| |
| void | syDtEndPacket (SYSocketHandle sock) |
| |
| NQ_STATUS | syDtFromSocket (SYSocketHandle sock, SYFile file, NQ_COUNT *len) |
| |
| NQ_STATUS | syDtToSocket (SYSocketHandle sock, SYFile file, NQ_COUNT *len) |
| |
| void | syUnicodeToUTF8N (NQ_CHAR *outStr, NQ_UINT outLength, const NQ_WCHAR *inWStr, NQ_UINT inLength) |
| |
| void | syUTF8ToUnicodeN (NQ_WCHAR *outWStr, NQ_UINT outLength, const NQ_CHAR *inStr, NQ_UINT inLength) |
| |
| NQ_BOOL | initCodePageUTF8 (void) |
| |
| int | syUnixMode2DosAttr (int mode) |
| |
| NQ_UINT32 | syGetLastSmbError (void) |
| |
| void | sySetLastNqError (NQ_STATUS nqErr) |
| |